var _h = $(window).height()-100;
function startmarquee(lh, speed, delay) {
    var t;
    var oHeight = _h;/*div的高度*/
    var p = false;
    var o = document.getElementById("content");

    var preTop = 0;
    o.scrollTop = 0;
    function start() {
        t = setInterval(scrolling, speed);
        o.scrollTop += 1;
    }
    function scrolling() {
        if (o.scrollTop % lh != 0 && o.scrollTop % (o.scrollHeight - oHeight - 1) != 0) {
            preTop = o.scrollTop;
            o.scrollTop += 1;
            if (preTop >= o.scrollHeight || preTop == o.scrollTop) {
                o.off()
            }
        }else{
            clearInterval(t);
            setTimeout(start, delay);
        }
    }
    setTimeout(start, delay);
}
window.onload=function(){
    /*startmarquee(一次滚动高度,速度,停留时间)*/
    $('#content').height(_h)
    //setTimeout("startmarquee(50, 20, 0)",2000);
}
function getValue(key) {
    var name = key;
    var str = window.location.search;
    if(str.indexOf(name) != -1){
        var pos_start = str.indexOf(name) + name.length + 1;
        var pos_end = str.indexOf("&", pos_start);
        if(pos_end == -1){
            return decodeURIComponent(str.substring(pos_start));
        }else{
            return decodeURIComponent(str.substring(pos_start, pos_end));
        }
    }
}